/*
 * main.c
 *
 *  Created on: Jan 19, 2012
 *      Author: Administrator
 */


#include <avr/io.h>
#include <avr/interrupt.h>
#include "DS1306.h"
#include "SPI.h"

int main(void)
{
	uint8_t seconds, minutes, hours, AMPM;
	char buffer[16];
	initSPI();
	setTime(0x15, 0x50,0x01, 1);
	for(;;)
	{
		seconds = getSeconds();
		minutes = getMinutes();
		hours = getHours();
		AMPM = getAMPM();
		sprintf(buffer, "%u:%u:%u",hours,minutes,seconds);
	}
	return 0;
}
